

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>aiy.vision.inference &mdash; AIY Projects 2018-11-16 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/language_data.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="aiy.vision.models" href="aiy.vision.models.html" />
    <link rel="prev" title="aiy.vision.annotator" href="aiy.vision.annotator.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> AIY Projects
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Common APIs</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="aiy.board.html">aiy.board</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.leds.html">aiy.leds</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.pins.html">aiy.pins</a></li>
</ul>
<p class="caption"><span class="caption-text">Vision Kit APIs</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="vision.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.toneplayer.html">aiy.toneplayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.trackplayer.html">aiy.trackplayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.vision.annotator.html">aiy.vision.annotator</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">aiy.vision.inference</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.vision.models.html">aiy.vision.models</a></li>
</ul>
<p class="caption"><span class="caption-text">Voice Kit APIs</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="voice.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.assistant.html">aiy.assistant</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.cloudspeech.html">aiy.cloudspeech</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.voice.audio.html">aiy.voice.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="aiy.voice.tts.html">aiy.voice.tts</a></li>
</ul>
<p class="caption"><span class="caption-text">Other docs</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://github.com/google/aiyprojects-raspbian">Source code (GitHub)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/CHANGES.md">Change log (GitHub)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/HACKING.md">Software setup (GitHub)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/CONTRIBUTING.md">Contribution guide (GitHub)</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">AIY Projects</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>aiy.vision.inference</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/aiy.vision.inference.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="module-aiy.vision.inference">
<span id="aiy-vision-inference"></span><h1>aiy.vision.inference<a class="headerlink" href="#module-aiy.vision.inference" title="Permalink to this headline">¶</a></h1>
<p>An inference engine that communicates with the Vision Bonnet from the
Raspberry Pi side.</p>
<p>It can be used to load a model, analyze local image or image from camera
shot. It automatically unload the model once the associated object is
deleted. See image_classification.py and object_recognition.py as examples on
how to use this API.</p>
<dl class="class">
<dt id="aiy.vision.inference.CameraInference">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">CameraInference</code><span class="sig-paren">(</span><em class="sig-param">descriptor</em>, <em class="sig-param">params=None</em>, <em class="sig-param">sparse_configs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.CameraInference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Helper class to run camera inference.</p>
<dl class="method">
<dt id="aiy.vision.inference.CameraInference.close">
<code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.CameraInference.close" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.CameraInference.count">
<em class="property">property </em><code class="sig-name descname">count</code><a class="headerlink" href="#aiy.vision.inference.CameraInference.count" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.CameraInference.engine">
<em class="property">property </em><code class="sig-name descname">engine</code><a class="headerlink" href="#aiy.vision.inference.CameraInference.engine" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.CameraInference.rate">
<em class="property">property </em><code class="sig-name descname">rate</code><a class="headerlink" href="#aiy.vision.inference.CameraInference.rate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.CameraInference.run">
<code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param">count=None</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.CameraInference.run" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="aiy.vision.inference.FirmwareVersion">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">FirmwareVersion</code><span class="sig-paren">(</span><em class="sig-param">major</em>, <em class="sig-param">minor</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.FirmwareVersion" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a></p>
<dl class="method">
<dt id="aiy.vision.inference.FirmwareVersion.major">
<em class="property">property </em><code class="sig-name descname">major</code><a class="headerlink" href="#aiy.vision.inference.FirmwareVersion.major" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.FirmwareVersion.minor">
<em class="property">property </em><code class="sig-name descname">minor</code><a class="headerlink" href="#aiy.vision.inference.FirmwareVersion.minor" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="aiy.vision.inference.FirmwareVersionException">
<em class="property">exception </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">FirmwareVersionException</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.FirmwareVersionException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></a></p>
</dd></dl>

<dl class="class">
<dt id="aiy.vision.inference.FromSparseTensorConfig">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">FromSparseTensorConfig</code><span class="sig-paren">(</span><em class="sig-param">logical_shape</em>, <em class="sig-param">tensor_name</em>, <em class="sig-param">squeeze_dims</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.FromSparseTensorConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a></p>
<dl class="method">
<dt id="aiy.vision.inference.FromSparseTensorConfig.logical_shape">
<em class="property">property </em><code class="sig-name descname">logical_shape</code><a class="headerlink" href="#aiy.vision.inference.FromSparseTensorConfig.logical_shape" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.FromSparseTensorConfig.squeeze_dims">
<em class="property">property </em><code class="sig-name descname">squeeze_dims</code><a class="headerlink" href="#aiy.vision.inference.FromSparseTensorConfig.squeeze_dims" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.FromSparseTensorConfig.tensor_name">
<em class="property">property </em><code class="sig-name descname">tensor_name</code><a class="headerlink" href="#aiy.vision.inference.FromSparseTensorConfig.tensor_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="aiy.vision.inference.ImageInference">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">ImageInference</code><span class="sig-paren">(</span><em class="sig-param">descriptor</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.ImageInference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Helper class to run image inference.</p>
<dl class="method">
<dt id="aiy.vision.inference.ImageInference.close">
<code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.ImageInference.close" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ImageInference.engine">
<em class="property">property </em><code class="sig-name descname">engine</code><a class="headerlink" href="#aiy.vision.inference.ImageInference.engine" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ImageInference.run">
<code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param">image</em>, <em class="sig-param">params=None</em>, <em class="sig-param">sparse_configs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.ImageInference.run" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="aiy.vision.inference.InferenceEngine">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">InferenceEngine</code><a class="headerlink" href="#aiy.vision.inference.InferenceEngine" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Class to access InferenceEngine on VisionBonnet board.</p>
<p>Inference result has the following format:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">message</span> <span class="n">InferenceResult</span> <span class="p">{</span>
  <span class="n">string</span> <span class="n">model_name</span><span class="p">;</span>  <span class="o">//</span> <span class="n">Name</span> <span class="n">of</span> <span class="n">the</span> <span class="n">model</span> <span class="n">to</span> <span class="n">run</span> <span class="n">inference</span> <span class="n">on</span><span class="o">.</span>
  <span class="n">int32</span> <span class="n">width</span><span class="p">;</span>        <span class="o">//</span> <span class="n">Input</span> <span class="n">image</span><span class="o">/</span><span class="n">frame</span> <span class="n">width</span><span class="o">.</span>
  <span class="n">int32</span> <span class="n">height</span><span class="p">;</span>       <span class="o">//</span> <span class="n">Input</span> <span class="n">image</span><span class="o">/</span><span class="n">frame</span> <span class="n">height</span><span class="o">.</span>
  <span class="n">Rectangle</span> <span class="n">window</span><span class="p">;</span>   <span class="o">//</span> <span class="n">Window</span> <span class="n">inside</span> <span class="n">width</span> <span class="n">x</span> <span class="n">height</span> <span class="n">image</span><span class="o">/</span><span class="n">frame</span><span class="o">.</span>
  <span class="n">int32</span> <span class="n">duration_ms</span><span class="p">;</span>  <span class="o">//</span> <span class="n">Inference</span> <span class="n">duration</span><span class="o">.</span>
  <span class="nb">map</span><span class="o">&lt;</span><span class="n">string</span><span class="p">,</span> <span class="n">FloatTensor</span><span class="o">&gt;</span> <span class="n">tensors</span><span class="p">;</span>  <span class="o">//</span> <span class="n">Output</span> <span class="n">tensors</span><span class="o">.</span>

  <span class="n">message</span> <span class="n">Frame</span> <span class="p">{</span>
    <span class="n">int32</span> <span class="n">index</span><span class="p">;</span>        <span class="o">//</span> <span class="n">Frame</span> <span class="n">number</span><span class="o">.</span>
    <span class="n">int64</span> <span class="n">timestamp_us</span><span class="p">;</span> <span class="o">//</span> <span class="n">Frame</span> <span class="n">timestamp</span><span class="o">.</span>
  <span class="p">}</span>

  <span class="n">Frame</span> <span class="n">frame</span><span class="p">;</span>          <span class="o">//</span> <span class="n">Frame</span><span class="o">-</span><span class="n">specific</span> <span class="n">inference</span> <span class="n">data</span><span class="o">.</span>
<span class="p">}</span>
</pre></div>
</div>
<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.camera_inference">
<code class="sig-name descname">camera_inference</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.camera_inference" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the latest inference result from VisionBonnet.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.close">
<code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.close" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.get_camera_state">
<code class="sig-name descname">get_camera_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.get_camera_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns current camera state.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.get_firmware_info">
<code class="sig-name descname">get_firmware_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.get_firmware_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns firmware version as (major, minor) tuple.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.get_inference_state">
<code class="sig-name descname">get_inference_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.get_inference_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns inference state.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.get_system_info">
<code class="sig-name descname">get_system_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.get_system_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns system information: uptime, memory usage, temperature.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.image_inference">
<code class="sig-name descname">image_inference</code><span class="sig-paren">(</span><em class="sig-param">model_name</em>, <em class="sig-param">image</em>, <em class="sig-param">params=None</em>, <em class="sig-param">sparse_configs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.image_inference" title="Permalink to this definition">¶</a></dt>
<dd><p>Runs inference on image using model identified by model_name.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>model_name</strong> – string, unique identifier used to refer a model.</p></li>
<li><p><strong>image</strong> – PIL.Image,</p></li>
<li><p><strong>params</strong> – dict, additional parameters to run inference</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>pb2.Response.InferenceResult</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.load_model">
<code class="sig-name descname">load_model</code><span class="sig-paren">(</span><em class="sig-param">descriptor</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.load_model" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads model on VisionBonnet.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>descriptor</strong> – ModelDescriptor, meta info that defines model name,
where to get the model and etc.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Model identifier.</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.reset">
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.reset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.start_camera_inference">
<code class="sig-name descname">start_camera_inference</code><span class="sig-paren">(</span><em class="sig-param">model_name</em>, <em class="sig-param">params=None</em>, <em class="sig-param">sparse_configs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.start_camera_inference" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts inference running on VisionBonnet.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.stop_camera_inference">
<code class="sig-name descname">stop_camera_inference</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.stop_camera_inference" title="Permalink to this definition">¶</a></dt>
<dd><p>Stops inference running on VisionBonnet.</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.InferenceEngine.unload_model">
<code class="sig-name descname">unload_model</code><span class="sig-paren">(</span><em class="sig-param">model_name</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceEngine.unload_model" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes model on VisionBonnet.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>model_name</strong> – string, unique identifier used to refer a model.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="aiy.vision.inference.InferenceException">
<em class="property">exception </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">InferenceException</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.InferenceException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></a></p>
</dd></dl>

<dl class="class">
<dt id="aiy.vision.inference.ModelDescriptor">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">ModelDescriptor</code><span class="sig-paren">(</span><em class="sig-param">name</em>, <em class="sig-param">input_shape</em>, <em class="sig-param">input_normalizer</em>, <em class="sig-param">compute_graph</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.ModelDescriptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a></p>
<dl class="method">
<dt id="aiy.vision.inference.ModelDescriptor.compute_graph">
<em class="property">property </em><code class="sig-name descname">compute_graph</code><a class="headerlink" href="#aiy.vision.inference.ModelDescriptor.compute_graph" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 3</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ModelDescriptor.input_normalizer">
<em class="property">property </em><code class="sig-name descname">input_normalizer</code><a class="headerlink" href="#aiy.vision.inference.ModelDescriptor.input_normalizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ModelDescriptor.input_shape">
<em class="property">property </em><code class="sig-name descname">input_shape</code><a class="headerlink" href="#aiy.vision.inference.ModelDescriptor.input_shape" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ModelDescriptor.name">
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#aiy.vision.inference.ModelDescriptor.name" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="aiy.vision.inference.ThresholdingConfig">
<em class="property">class </em><code class="sig-prename descclassname">aiy.vision.inference.</code><code class="sig-name descname">ThresholdingConfig</code><span class="sig-paren">(</span><em class="sig-param">logical_shape</em>, <em class="sig-param">threshold</em>, <em class="sig-param">top_k</em>, <em class="sig-param">to_ignore</em><span class="sig-paren">)</span><a class="headerlink" href="#aiy.vision.inference.ThresholdingConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a></p>
<dl class="method">
<dt id="aiy.vision.inference.ThresholdingConfig.logical_shape">
<em class="property">property </em><code class="sig-name descname">logical_shape</code><a class="headerlink" href="#aiy.vision.inference.ThresholdingConfig.logical_shape" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ThresholdingConfig.threshold">
<em class="property">property </em><code class="sig-name descname">threshold</code><a class="headerlink" href="#aiy.vision.inference.ThresholdingConfig.threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ThresholdingConfig.to_ignore">
<em class="property">property </em><code class="sig-name descname">to_ignore</code><a class="headerlink" href="#aiy.vision.inference.ThresholdingConfig.to_ignore" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 3</p>
</dd></dl>

<dl class="method">
<dt id="aiy.vision.inference.ThresholdingConfig.top_k">
<em class="property">property </em><code class="sig-name descname">top_k</code><a class="headerlink" href="#aiy.vision.inference.ThresholdingConfig.top_k" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>

</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="aiy.vision.models.html" class="btn btn-neutral float-right" title="aiy.vision.models" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="aiy.vision.annotator.html" class="btn btn-neutral float-left" title="aiy.vision.annotator" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2018, Google LLC

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>